<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>Document</title>

</head>

<body>

    <script>

        let arr=[1,2,3,4,5,6]

        let a=[...arr];

        console.log(a);

        let b=a;

        a[2]=100;

        console.log(b[2]);

        // 两个指向同一内容

        // console.log(arr[2]);

        let c=[...a,...arr];

        console.log(c.length);

        let [first,...rest]=[...arr];

 

        console.log(rest[2]);

        a.copyWithin(0,2,4);

        console.log(a);

        let fr=arr.find(function(v){

            return v>3;

        })

 

    </script>

</body>

</html>